import request from "@/utils/system/request";

// 表单分类
// export const getroleCategory = () => {
//   return request({
//     url: "/role_1/category",
//     method: "post",
//     baseURL: "/mock",
//   });
// };
//获取表格
// export const getroleData = (params: object) => {
//   return request({
//     url: "/role_1/list",
//     method: "post",
//     // baseURL: "/mock",
//     data:params,
//   });
// }

//表格查询
export const getroleSearch = (params: object) => {
    return request({
      url: "/complexNet/role/getRoleList",
      method: "post",
      // baseURL: "/mock",
      data:params,
    });
  }

//单个角色查询
export const checkrole = (params: object) => {
  return request({
    url: "/complexNet/role/getRoleInfo",
    method: "post",
    // baseURL: "/mock",
    params:params,
  });
}
// 新增
export const addrole = (params: object) => {
  return request({
    url: "/complexNet/role/saveRole",
    method: "post",
    // baseURL: "/mock",
    data:params,
    // headers:{
    //   'Content-Type':'application/json;charset=UTF-8'
    // }
  });
}

// export const getnowuser = () => {
//   return request({
//     url: "/complexNet/getLoginUser",
//     method: "get",
//     // baseURL: "/mock",
//     // headers:{
//     //   'Content-Type':'application/json;charset=UTF-8'
//     // }
//   });
// }
// 编辑
export const updaterole = (params: object) => {
  return request({
    url: "/complexNet/role/updateRole",
    method: "post",
    // baseURL: "/mock",
    data:params,
  });
}

// 删除
export const delrole = (params: object) => {
  return request({
    url: "/complexNet/role/deleteRole",
    method: "post",
    // baseURL: "/mock",
    params:params,
  });
}
